using GameFramework.WebServer;

namespace Server.Proto
{
    /// <summary>
    /// 角色更新通知 GS->CS
    /// </summary>
    public class WebRoleUpdateNotify : WebServerReq<WebServerResp>
    {
        public const string RouteKey = "role_update_notify";

        public override string Route => RouteKey;
        
        /// <summary>
        /// 账号id
        /// </summary>
        public long AccountId { get; set; }
        
        /// <summary>
        /// 服务器id
        /// </summary>
        public int ServerId { get; set; }
        
        /// <summary>
        /// 角色信息
        /// </summary>
        public AccountRoleInfo RoleInfo { get; set; }

        public override void OnRecycle()
        {
            AccountId = default;
            ServerId = default;
            RoleInfo?.Recycle();
            RoleInfo = default;
        }
    }
}